<ul class="toolbar">
<?php
 $sad_toolbar=array(
  array(
   'label'=>$LANGS['title']['main'], 
   'title'=>$LANGS['title']['l_main'],
   'href' =>'/i/',
   'children'=>array(
    array('label'=>'<img src="'.$sad_baseurl.'/i/style/wand.png" style="border: none; width: 16px; height: 16px; margin-top: -1px;">'.$LANGS['title']['option'],'title'=>$LANGS['title']['l_option'],'href'=>'/i/options.php'),
    array('label'=>$LANGS['title']['phpinfo'],'title'=>$LANGS['title']['l_phpinfo'],'href'=>'/i/phpinfo.php'),
    array('label'=>$LANGS['title']['sql'],'title'=>$LANGS['title']['l_sql'],'href'=>'/i/sql.php')
   )
  ),
  array(
   'label'=>$LANGS['title']['upload'],
   'title'=>$LANGS['title']['l_upload'],
   'href' =>'/i/uploadfiles.php',
   'children'=>array(
    array('label'=>$LANGS['title']['pictures'],'title'=>$LANGS['title']['l_pictures'],'href'=>'/i/pictures.php')
   )
  ),
  array(
   'label'=>$LANGS['title']['visits'], 
   'title'=>$LANGS['title']['l_visits'],
   'href' =>'/i/visits.php',
   'children'=>array(
    array('label'=>$LANGS['title']['history'],'href'=>'/i/history.php')
   )
  ),
  array(
   'label'=>$LANGS['title']['logout'], 
   'title'=>$LANGS['title']['l_logout'],
   'href' =>'/i/logout.php',
  ),
 );
 if (iamd()){
  $sad_toolbar[1]['children'][]=array('label'=>'<img src="'.$sad_baseurl.'/i/style/blue-document-attribute-p.png" style="border: none; margin-top: -1px;">'.$LANGS['title']['code'],'title'=>$LANGS['title']['l_code'],'href'=>'/i/showcode.php');
 }
 
 if (file_exists($sad_root.'/templates/includes/admin/toolbar.php')){
  include($sad_root.'/templates/includes/admin/toolbar.php');
 }
 
 $sad_buf="\r\n";
 for ($menu1=0;$menu1<count($sad_toolbar);$menu1++){
  echo '<li><a href="'.$sad_baseurl.$sad_toolbar[$menu1]['href'].'" title="'.$sad_toolbar[$menu1]['title'].
       '" id="tool'.$menu1.'" onMouseOver="toolbarover(this)" onMouseOut="toolbarout(this)">'.
	   $sad_toolbar[$menu1]['label'].'</a></li>';
  if ($menu1+1<count($sad_toolbar)){
   echo '<li><img src="'.$sad_baseurl.'/i/style/delim.png" usemap="#nav'.$menu1.'"></li>';
   $sad_buf.='<map name="nav'.$menu1.'"><area shape="poly" coords="0,2,15,17,0,32" href="'.$sad_baseurl.
             $sad_toolbar[$menu1]['href'].'" title="'.$sad_toolbar[$menu1]['title'].
			 '"/><area shape="poly" coords="2,2,22,2,22,32,2,32,17,17" href="'.$sad_baseurl.
			 $sad_toolbar[$menu1+1]['href'].'" title="'.$sad_toolbar[$menu1+1]['title'].'"/></map>';
  }
  if (!isset($sad_toolbar[$menu1]['children'])){$sad_toolbar[$menu1]['children']=array();}
  $sad_buf.='<div class="toolbar_hid" id="hid_tool'.$menu1.'" onMouseOver="toolbarover(this)" onMouseOut="toolbarout(this)">';
  for ($menu2=0;$menu2<count($sad_toolbar[$menu1]['children']);$menu2++){
   $sad_buf.="<a href=\"".$sad_baseurl.$sad_toolbar[$menu1]['children'][$menu2]['href']."\" title=\"".
        $sad_toolbar[$menu1]['children'][$menu2]['title']."\">".$sad_toolbar[$menu1]['children'][$menu2]['label']."</a>\r\n";
  }
  $sad_buf.="</div>\r\n";
 }
 echo '</ul>'.$sad_buf;
?>
<script src="<?php echo $sad_baseurl; ?>/i/style/toolbar.js"></script>